package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyTags;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyTagsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyTags record);

    StrategyTags selectByPrimaryKey(Long id);

    List<StrategyTags> selectAll();

    int updateByPrimaryKey(StrategyTags record);

    /**
     * 根据攻略id和标签名查询对应的标签对象
     * @param strategyId
     * @param tag
     * @return
     */
    StrategyTags selectTagByStrategyId(@Param("strategyId") Long strategyId, @Param("tag") String tag);

    /**
     * 根据攻略id查询赞同数前十的标签
     * @param strategyId
     * @return
     */
    List<StrategyTags> selectNeedByStrategyId(Long strategyId);

}